home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
System
/
CRESC
/
Variations
/
gen-collect
< prev
next >
Wrap
Lisp/Scheme
|
1996-03-26
|
1KB
|
29 lines
gen-collect seed number-of-times how function-expression
Use this function to collect a sequence of generations or processing operations that
allow for a random operation to control the output.
(setq mel
(gen-collect 0.5 3 :list
'(vector-to-symbol a l
(gen-noise-white (get-random 10 30)))))
In the example above, three generations of white noise are created and collected into
a nested list. The function get-random randomizes the number of values generated.
The absence of a seed in the function expression ensures three different generations.
The how parameter offers the composer the choice of listing generations in a nested
list, :list, or appending, :append, generations in a single list.
IMPORTANT - Note that the function expression is quoted. This is to ensure that
the seed can be initialized properly.
To create dynamics to match symbol generation you could do the following:
(setq vel
(gen-collect 0.5 3 :list
'(vector-to-list
(vector-round 32 80
(gen-noise-white (get-random 5 25) 0.4)))))